#ifndef HISTORIQUE_H
#define HISTORIQUE_H

#include <QVector>
#include <QString>
#include <QFile>
#include <QTextStream>

class History
{
        QVector<QString> stack;
        int i;
public:
    History();//const QFile&);
    void add(const QString&);
    void save()const;
    void clear();
    QString current()const{if(i==stack.size())return "";return stack[i];}
    bool previous(){if(i>0){i--;return true;}return false;}
    bool next(){if(i<stack.size()){i++;return true;}return false;}
    QString operator[](int i){return stack[i];}
    int size(){return stack.size();}
};

#endif // HISTORIQUE_H
